agentMET4FOF streams¶
-
class
agentMET4FOF.streams.
DataStreamMET4FOF
[source]¶ Class for creating finite datastream for ML with x as inputs and y as target Data can be fetched sequentially using next_sample() or all at once all_samples()
For sensors data: The format shape for 2D data stream (num_samples, n_sensors) The format shape for 3D data stream (num_samples, sample_length , n_sensors)
-
all_samples
()[source]¶ Returns all the samples in the data stream
Returns: samples Return type: dict of the form {‘x’: current_sample_x, ‘y’: current_sample_y}
-
has_more_samples
()[source]¶ Checks if stream has more samples.
Returns: True if stream has more samples. Return type: Boolean
-
next_sample
(batch_size=1)[source]¶ Fetches the samples from the data stream and advances the internal pointer current_idx
Parameters: batch_size (int) – number of batches to get from data stream Returns: samples Return type: dict of the form {‘x’: current_sample_x, ‘y’: current_sample_y}
-